package com.ccq.repository;


import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.ccq.domain.User;

@Mapper
public interface UserMapper {
	@Select("select * from user where name = #{name}")
	User findByName(@Param("name") String name);

	@Insert("insert into user(name, age) values(#{name}, #{age})")
	int insert(@Param("name") String name, @Param("age") Integer age);

	@Select("select * from user where id = #{id}")
	User selectUser(@Param("id") int id);
}
